/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package chat;

/**
 *
 * @author salm
 */
public class CommandMessage extends BaseChatMessage
{
    public static final int COMMANDMESSAGE_TYPE_USER_JOINED = 0;
    public static final int COMMANDMESSAGE_TYPE_USER_LEFT = 1;
    public static final int COMMANDMESSAGE_TYPE_USER_CHANGED = 2;
    public static final int COMMANDMESSAGE_TYPE_BECOME_TALKER = 3;
    
    private int commandType;
    private String commandParam;
    
    public CommandMessage(String senderID, String receiver, int commandType, String param)
    {
        super(senderID, receiver);
        
        this.commandType = commandType;
        this.commandParam = param;
    }
    
    @Override
    public int getMessageType() {
        return CHATMESSAGE_TYPE_COMMAND;
    }

    /**
     * @return the commandType
     */
    public int getCommandType() {
        return commandType;
    }

    /**
     * @param commandType the commandType to set
     */
    public void setCommandType(int commandType) {
        this.commandType = commandType;
    }

    /**
     * @return the commandParam
     */
    public String getCommandParam() {
        return commandParam;
    }

    /**
     * @param commandParam the commandParam to set
     */
    public void setCommandParam(String commandParam) {
        this.commandParam = commandParam;
    }
}
